USE [HR_DB]
GO
if exists(select * from dbo.sysobjects where id = object_id(N'r_menu_role_bak')   and   OBJECTPROPERTY(id,   N'IsUserTable')   =   1)   
  drop table r_menu_role_bak   
-- =============================================
-- Author:杨洁(kaixuanpisces)
-- Create date: 20090728
-- Description:	菜单角色关系备份表
-- =============================================
CREATE TABLE [dbo].[r_menu_role_bak](
	[menu_id] [int] NOT NULL,
	[role_id] [smallint] NOT NULL,
	[start_time] [smalldatetime] NOT NULL,
	[end_time] [smalldatetime] NOT NULL,
	[status] [tinyint] NOT NULL
) ON [PRIMARY]

-- ==============================================
-- 列名说明
-- ==============================================
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'菜单编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'r_menu_role_bak', @level2type=N'COLUMN',@level2name=N'menu_id'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'角色编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'r_menu_role_bak', @level2type=N'COLUMN',@level2name=N'role_id'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'开始时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'r_menu_role_bak', @level2type=N'COLUMN',@level2name=N'start_time'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'结束时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'r_menu_role_bak', @level2type=N'COLUMN',@level2name=N'end_time'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'状态(1、删除2、修改)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'r_menu_role_bak', @level2type=N'COLUMN',@level2name=N'status'